<?php
/**
 * User: helloJiu
 * Date: 2021/9/18
 * Time: 17:36
 */
namespace App\Algorithm;

use App\Algorithm\DP\Bag;
use App\Algorithm\DP\CombinationSum4;
use App\Algorithm\DP\ELSEnvelope;
use App\Algorithm\DP\FindCheapestPrice;
use App\Algorithm\DP\FindCheapestPriceByDP;
use App\Algorithm\DP\FindTargetSumWays;
use App\Algorithm\DP\LastStoneWeightII;
use App\Util\PrintUtil;

require "../../vendor/autoload.php";

class Main
{
    public function main(){
        // (new NQueues())->placeQueue(12);
        // PrintUtil::println((new Coin())->coin2(10086));
        // PrintUtil::println((new Coin())->coin3(1006));
        //  [[5,4],[6,4],[6,7],[2,3]]
        //  [[1,1],[1,1],[1,1]]
        // $len = (new ELSEnvelope())->maxEnvelopes([[5,4],[6,4],[6,7],[2,3]]);
        // PrintUtil::println($len);
        // $len = (new FindCheapestPriceByDP())->findCheapestPrice(5, [[0,1,4],[1,2,4],[0,3,2],[3,1,4],[1,4,5],[4,2,1]], 0, 2, 2);
        // $len = (new FindCheapestPriceByDP())->findCheapestPrice(2,[[0,1,2]],1, 0, 2);
        // PrintUtil::println($len);
        // $len = (new FindCheapestPrice())->findCheapestPrice(5, [[0,1,5],[1,2,5],[0,3,2],[3,1,2],[1,4,1],[4,2,1]], 0, 2, 2);
        // PrintUtil::println($len);

        // $bag = new Bag();
        // PrintUtil::println($bag->handle(3, 4, [1, 3, 4], [15, 20, 30]));
        // PrintUtil::println($bag->handle1(3, 4, [1, 3, 4], [15, 20, 30]));
        // PrintUtil::println((new LastStoneWeightII())->lastStoneWeightII([31,26,33,21,40]));
        // PrintUtil::println((new FindTargetSumWays())->findTargetSumWays([100], -200));
        PrintUtil::println((new CombinationSum4())->combinationSum4([1,2,3], 4));
    }
}

(new Main())->main();